package com.ruoyi.web.controller.applet;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.BdmAgreements;
import com.ruoyi.system.service.IBdmAgreementsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 协议对象 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-31
 */
@Api(tags = "小程序-协议")
@RestController
@RequestMapping("/applet/agreements")
public class AppletAgreementsController extends BaseController {


    @Autowired
    private IBdmAgreementsService iBdmAgreementsService;


    /**
     * 查询协议
     */
    @GetMapping("/list")
    public TableDataInfo list() {
        startPage();
        List<BdmAgreements> list = iBdmAgreementsService.lambdaQuery().orderByDesc(BdmAgreements::getCreateTime).list();
        return getDataTable(list);
    }
}
